/**
 * @desc 用户信息模块
 * @author menguang
 * @date 2024-04-20
 */

const initMac = () => {
	const num = Math.floor(Math.random() * 100);
	return `00-50-56-C0-00-${num < 10 ? '0' + num : num}`;
};

export default {
	namespaced: true,
	state: {
		deviceParams: {
			mac: initMac() // 设备mac地址,比传项
			// deviceName: "",
			// deviceSn: "",
			// fallCheck: "",
			// fallSmsNotice: "",
			// fallWarnTime: "",
			// installMode: "",
			// respiratoryPauseWarning: "",
			// sleepMonitoring: "",
			// sleepPostureMonitoring: "",
			// sleepSmsNotice: "",
			// workMode: ""
		}
	},
	getters: {

	},
	mutations: {
		SET_DEVICE_PARAMAS(state, data) {
			state.deviceParams[data.key] = data.value;
		},
		CLEAR_DEVICE_PARAMAS(state, data) {
			state.deviceParams = {};
		}
	},
	actions: {

	}
};

